 var id = getvl("id");
 getOneAdmin2();
function getOneAdmin2() {
	$.ajax({
		url: urlcore + "/api/user/getadmin",
		type: "get",
		dataType: 'json',
		contentType: "application/json;charset=utf-8",
		success: function(data) {
			if(data.success == true) {
				if(data.data!=null && data.data!=""){
						fangkeshu(1);
						chaxun(7);
						 dianjisdianji(data.data.id);
				}
			}
		},
		error: function() {
			/* Act on the event */
			alert("error");
		}
	});
}

function dianjis(str){
	fangkeshu($(str).attr("id"));
}
 //访客数
  function fangkeshu(num){
    $(".qushi_time").html("");
     	$.ajax({   
            url: urlcore + "/api/visit/selectVisitList2?num="+num+"&userId="+uuuuid,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					var fangke="";
					if(num==1){
								var fangke='<h6>日期<span>访问数(人)</span></h6>'+
	   '<ul>';
					}else if(num==2){
									var fangke='<h6>日期<span>浏览量(次)</span></h6>'+
	   '<ul>';
					}else if(num==2){
									var fangke='<h6>日期<span>交易金额(元)</span></h6>'+
	   '<ul>';
					}else if(num==2){
									var fangke='<h6>日期<span>转化率(%)</span></h6>'+
	   '<ul>';
					}else if(num==2){
									var fangke='<h6>日期<span>支付买家数(人)</span></h6>'+
	   '<ul>';
					}else if(num==2){
									var fangke='<h6>日期<span>客单数(单)</span></h6>'+
	   '<ul>';
					}
		       $.each(data.data.statisticsList,function(y,n){
		    fangke+='<li>'+
			'<span>'+n.date+'</span>'+
			 '<em>'+n.count+'</em>'+
		'</li>';
		            });
       	fangke+='</ul>';
					$(".qushi_time").append(fangke);
				}
			},
			error: function() {
				alert("error");
			}
		});
}
/*//浏览量
 function liulangliang(){
 	   
 	       
 	   
 }
 */


   
   function dianjisdianji(){
 		$("#xianshuju").html("");
     	$.ajax({   
            url: urlcore + "/api/visit/selectVisitCount2?userId="+uuuuid,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
             $("#fangkeshu").html(data.data.visitorRate);
	         $("#liulanlaing").html(data.data.lookCount);
	         $("#selectOrderMoney").html(data.data.money);
             $("#percentOfConversion").html(data.data.transactionOrderCount);
             $("#selectPayBullInfoCount").html(data.data.conversionRate);
             $("#customerOrderCount").html(data.data.customerOrderCount);
				}
			},
			error: function() {
				alert("error");
			}
		});   
   }

